﻿using System;
using System.Runtime.Serialization;

namespace VPLink2014.Data.MesApplis
{
    [DataContract]
    public class VOApplication
    {
        [DataMember(Name = "Name", Order = 2)]
        public string Name { get; set; }

		[DataMember( Name = "Id", Order = 1 )]
		public int Id { get; set; }
		
		[DataMember( Name = "Url", Order = 3 )]
        public string Url { get; set; }

		[DataMember( Name = "Description", Order = 4 )]
		public string Description { get; set; }


		[DataMember( Name = "Categorie", Order = 5 )]
		public string Categorie { get; set; }

		[DataMember( Name = "Obligatoire", Order = 6)]
		public bool? Obligatoire { get; set; }

		[DataMember( Name = "Rang", Order = 7 )]
		public int? Rang { get; set; }

		public override bool Equals( Object obj )
        {
            // Check for null values and compare run-time types.
            if (obj == null || GetType() != obj.GetType())
                return false;

            VOApplication p = (VOApplication)obj;
            if (this.Name == p.Name)
            {
                return true;
            }

            return false;
        }
        public override int GetHashCode()
        {
            return this.Name.GetHashCode();
        }


    }
}
